/**
 * match
 * samedi 23 12 2017
 */
package com.match.pattern.singleton.model;

/**
 * @author match
 * samedi 23 12 2017
 * 'Effective Java's Class
 */
public class SingletonFive {

//	public static final SingletonFive instance=new SingletonFive();
	private static SingletonFive INSTANCE=new SingletonFive();

	private SingletonFive() {
		System.out.println("我是一个实例！");
	}
	
	public static SingletonFive getInstance(){
		return INSTANCE;
	}
	
	public void haha(String name) {
		System.out.println("haha: "+name);
	}
	
	private Object readResolve() {
		return INSTANCE;
	}

}
